package com.atguigu.classroom.vod.service.impl;

import com.atguigu.classroom.model.vod.Video;
import com.atguigu.classroom.vod.service.VodService;
import com.atguigu.classroom.vod.utils.QiniuUtils;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class VodServiceImpl implements VodService {
    @Override
    public void deleteVideo(Video video) {
        if(video.getVideoSourceId()!=null){
            List<String> filekey=new ArrayList<>();
            filekey.add(video.getVideoSourceId());
            QiniuUtils.deleteFileList(filekey);
        }
    }
}
